<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------

namespace app\user_center\validate\balance;

use think\Validate;

/**
 * 订单验证其
 * @package app\admin\validate
 * @author jason wang <120907037@qq.com>
 */
class Order extends Validate
{
    protected $rule = [
        'user_id'       	=>  'number|require|gt:0|behavior:\app\user_center\behavior\common\checkUserId', 	 //user_id 数字/必填/大于0
		'price'  			=>  'require|gt:0',//反馈内容
		'order_id'	    =>  'require|number|gt:0',
		'pay_type' 		=>  'require|in:1,2,3',
    ];

    /* protected $message  =   [
        'user_id' 			=> 'user_id格式错误',
		'follow_user_id'	=> 'follow_user_id格式错误',
		'follow_type'		=> 'follow_type格式错误',
		'mobile'    		=> '手机号码格式错误',
		'code'    			=> '验证码格式错误',
		'mobile_type'    	=> '短信类型格式不正确',
		'mobile_token'    	=> 'token不能为空',
		'openid'    		=> 'openid格式错误',
		'nick_name'    		=> '用户昵称不能为空',
		'sex'    			=> 'sex格式错误',
		'birthday'    		=> 'birthday格式错误',
		'avatar_url'    	=> '头像不能为空',
		'oss_url'    		=> '头像路径不能为空',
    ]; */

    //验证场景
    protected $scene = [
        					'order_create'    	=>  [//订单创建
													'user_id',
													'price',
												],
							'order_pay'    	=>  [//订单支付
								'user_id',
								'order_id',
								'pay_type',
							],
							
               			];
}
